[Unit]
Description=etcd key-value store
Documentation=https://github.com/etcd-io/etcd
After=network.target
After=network-online.target
Wants=network-online.target

 
[Service]
Type=notify
EnvironmentFile={{ ETCD_CONF_PATH }}/{{ ETCD_CONF_FILE }}
ExecStart={{ K8S_ALL_EXE_FILE_PATH }}/etcd \
  --cert-file={{ PKI_PATH }}/{{ ETCD_SELF_SIGNED_CERTIFICATE }} \
  --key-file={{ PKI_PATH }}/{{ ETCD_PRIVATE_KEY }} \
  --trusted-ca-file={{ PKI_PATH }}/{{ CA_SELF_SIGNED_CERTIFICATE }} \
  --peer-cert-file={{ PKI_PATH }}/{{ ETCD_SELF_SIGNED_CERTIFICATE }} \
  --peer-key-file={{ PKI_PATH }}/{{ ETCD_PRIVATE_KEY }} \
  --peer-trusted-ca-file={{ PKI_PATH }}/{{ CA_SELF_SIGNED_CERTIFICATE }} \
  --peer-client-cert-auth \
  --client-cert-auth
Restart=on-failure
RestartSec=5
LimitNOFILE=65536
 
[Install]
WantedBy=multi-user.target
